A characteristic color is color that is not included in a scene and is an artifact generated by an imaging device. Cameras often impart characteristic colors onto the images they produce. For example, a video camera may impart blue tones in the captured video images. Displays that display images may likewise impart characteristic colors onto the displayed images. Further, film (e.g., 35 mm film) often imparts a characteristic color onto images on the film. If characteristic colors are not removed from images before the images are displayed, the colors in the images may be unacceptable to viewers. For example, the blue tones that a video camera may impart onto video images can result in unnatural colors if not corrected.
Characteristic colors imparted onto images are often corrected by computing devices before the images are displayed, stored, recorded on film, etc. A graphical processing unit (GPU) included in the computing device may perform the correction.
A GPU may include a three-dimensional lookup table (3D LUT) that is used to provide color correction on images. A 3D LUT stores “color components” for colors in an image; e.g., a pixel in the image may be characterized by a red color component, a green color component, and a blue color component. Each dimension of the 3D LUT corresponds to a color component (e.g., red, green, blue). Color components may be represented by “color coordinates”, which are numeric values of the color components. For example, the red color component of a pixel in an image may have a value (i.e., coordinate) of 55, the green color component of the pixel may have a value of 135, and the blue color component may have a value of 39.
The 3D LUT may be used to provide a mapping of the input colors in an input image to output colors of an output image. In particular, the (input) color coordinates of the (input) color component of each pixel in the input image are used to index respective dimensions of the 3D LUT to access corresponding (output) color coordinates of the (output) color component of a corresponding pixel in the output image. If the 3D LUT is properly configured, then a characteristic color that is imparted in the input image can be eliminated from the resulting output image.
Different imaging devices, such as cameras, video displays, and so on, exhibit different color characteristics. Imaging devices that capture images may impart their specific color characteristics on the captured images, so that the colors of the imaged subject are not accurately captured. Imaging devices that display images may impart their specific color characteristics on the displayed image, so that the colors in the image being displayed are not accurately presented. The color characteristics imparted by a given imaging device can be characterized and well understood. Accordingly, a 3D LUT can be configured specifically for the given imaging device to provide a mapping that removes the color characteristic from an input image, whether the input image is a captured image or a displayed image.
In addition to removing characteristic colors from images, a GPU using a 3D LUT may add color effects to images. For example, specific 3D LUTs are designed so that a given color (e.g., red) in an image can be switched with another color (e.g., yellow), or so that colors in the image can be inverted to provide a negative of the image, etc.
GPUs for desktop computers, laptop computers, etc. are typically capable of storing 3D LUTs and performing color correction using the 3D LUTs. GPUs for mobile devices, on the other hand, are often not capable of storing 3D LUTs and are often not specifically designed for performing color correction. Consequently, color rendering of images in video games, videos, and the like performed on mobile devices may not produce acceptable colors.